package controller;

import model.CommandQueue;
import commands.Command;
import controller.handstates.AbstractState;

public class CommandManager {
	
	private static AbstractState state; // this is the state to give the command
	private static CommandQueue queue;
	
	public static void setState(AbstractState s, CommandQueue q){
		state = s;
		queue = q;
	}	
	
	public synchronized static void performActionCommand(Command command){
		// get the active player from the state
		int activePlayer = state.getHandChain().getActivePlayerSeat();
		
		// is the command from the active player?
		if(activePlayer == command.getPlayerSeat()){			
			queue.push(command);
		} else {
			// do nothing
		}		
	}
	
	
	public synchronized static void performInformationCommand(Command command){
		// these commands are always valid
		// get the information the command wants and ship it out
	}
	

	

}
